<?php include_once(dirname(__FILE__) . '/functions.php'); ?>
<?php load_theme_textdomain('simpax');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<!-- infos -->
<title><?php bloginfo('name'); ?><?php wp_title('&raquo;'); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<!-- this wordpress blog is using cax! http://cax-theme.info -->
<meta name="description" content="<?php bloginfo('description'); ?>" />
<link rel="shortcut icon" href="<?php bloginfo('url'); ?>/favicon.ico" />
<link rel="pavatar" href="<?php bloginfo('url'); ?>/pavatar.gif" />

<link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />

<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/style.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" media="print" />
<?php if(simpax_styleswitcher()) : ?>
<link rel="stylesheet" href="<?php seasonStyle(); ?>" type="text/css" id="the_stylsheet" />
<?php elseif(simpax_is_style()) : simpax_use_style(); ?>
<?php else :  ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/default.css" type="text/css" />
<?php endif; ?>
<?php if(simpax_styles_showcase()) simpax_list_styles_showcase(); ?>

<!-- somestimes there will be a very long style-part below -->
<style type="text/css">
<?php if( simpax_ext_links() ) : ?>
a[href^="http://"], a[href^="https://"]:hover {
	background: url("<?php bloginfo('stylesheet_directory'); ?>/img/external_link.gif") no-repeat left !important;
	padding-left:12px;
}
a[href^="<?php bloginfo('url'); ?>"], a[href^="<?php bloginfo('url'); ?>"]:hover {
	background-image: none !important; padding-left: 0;
} 
a[href$='.pdf'] { 
	padding: 5px 20px 5px 0;
	background: transparent url('<?php bloginfo('stylesheet_directory'); ?>/img/mime/pdf.png') no-repeat center right;
}
a[href ^="mailto:"] {
	padding: 5px 20px 5px 0;
    background: transparent url('<?php bloginfo('stylesheet_directory'); ?>/img/mime/email.png') no-repeat center right;
}
<?php endif; ?>
<?php if( simpax_sidebar() == "right" ) : ?>
#page, #bottombar {float: left !important; margin-left: 4%; margin-right: 4%; padding:0pt 3% 5%;}
.single-info, .comments {width: 100%; margin: 0 !important; border-top: 1px solid #999;}
#comment {width: 100% !important;}
<?php elseif( simpax_sidebar() == "left" ) : ?>
#page, #bottombar {float: right !important; margin-left: 2%; margin-right: 2%; padding:0pt 3% 5%;}
#sidebar {float: left !important;}
.single-info, .comments {width: 100%; margin: 0 !important; border-top: 1px solid #999;}
#comment {width: 100% !important;}
<?php elseif( simpax_sidebar() == "right_connected" ) : ?>
#uber_page {width: 85%; margin-left: 10%;}
#uber_page #page {width: 60%; float: left; margin: 0; padding:5px 4% 5% 1% !important;}
#uber_page #sidebar {width: 20%; float: left; margin: 0;}
#uber_page .single-info {width: 100%;}
#uber_page .comments {width: 100%;}
#uber_page #comment {width: 100%}
#footer {width: 80%; margin: 0 auto; padding: 0 10% !important;}
#bottombar {width: 60%; float: left; margin: 0;}
<?php endif; ?>

<?php if(! simpax_header_img() ) : ?>
body, #top {background-image: none !important;} 
#top { height: 60px !important; overflow: hidden;}
<?php endif; ?>

<?php if(simpax_is_cax_spam()) : ?>
#cax_sp4m a {border: none !important; background: none !important; }
#cax_sp4m {border: none !important; position: fixed; right: 0; bottom: 0%; background: url('<?php bloginfo('stylesheet_directory'); ?>/img/sp4m/<?php simpax_cax_spam() ?>') no-repeat top right transparent; height: 119px; z-index: 12;}
#cax_sp4m:hover {border: none !important; background-position: right bottom;}
.sp4m1 {position: fixed; right: 80px; bottom: 0;}
.sp4m2 {position: fixed; right: 60px; bottom: 0;}
* html #cax_sp4m {position: absolute; right: 0; bottom: 0%;}
* html .sp4m1 {position: absolute; right: 16px; bottom: 0;}
* html .sp4m2 {position: absolute; right: 0; bottom: 0;}
<?php endif; ?>

<?php if(simpax_is_title_img()) : ?>
#title_img {
<?php if( !simpax_title_img_center() ) : ?>
	position: absolute; 
	left:<?php simpax_title_img_x() ?>px ;
	top:<?php simpax_title_img_y() ?>px ;
<?php else : ?>
	padding-top: <?php simpax_title_img_y() ?>px !important;
<?php endif; ?>
}
<?php endif; ?>

<?php if( simpax_lightbox() == "one" ) : ?>
#overlay { 
	background-image: url("<?php bloginfo('stylesheet_directory'); ?>/js/one/images/overlay.png"); 
}
* html #overlay { 
	background-image: url("<?php bloginfo('stylesheet_directory'); ?>/js/one/images/blank.gif");
	filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="<?php bloginfo('stylesheet_directory'); ?>/js/one/images/overlay.png", sizingMethod="scale");
}
<?php endif; ?>
<?php if(simpax_styles_showcase()) : ?>
.cax_radio {margin: 0 auto;}
.cax_ul_radio li { float:left; background:#444; padding:3px; display:block; margin:3px; width: 20%; margin-right: 10px;-moz-border-radius:12px; min-width: 150px; }
.cax_ul_radio li  a { color: #ccc; border:none; text-decoration:none; display: block; }
.cax_ul_radio li  a:hover {color: #fff;}
.cax_ul_radio li:hover { background:#ff893b; }
.cax_ul_radio label {  }
<?php endif; ?>
</style>

<?php if( ((is_single() or is_page()) and simpax_ajaxcmt()) or simpax_lightbox() == "thick" or simpax_slide() or simpax_styles_showcase() or simpax_is_livesearch() ) : ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.js"></script>
<?php endif; ?>

<script type="text/javascript">
var caxdir = "<?php bloginfo('template_directory'); ?>";

$(document).ready(function(){

<?php if( simpax_slide() ) : ?>

<?php if(simpax_cmt_info() and !simpax_cmt_info_mini()) : ?>
	$("#comment-infos-content").hide();
	$("#comment-infos h3").click(function(){
		$("#comment-infos-content").slideToggle();
	});
<?php endif; ?>
<?php if(simpax_bottombar()) : ?>
	// bottombar
	$("#footer").hide();
	$("img#slide-bottombar").click(function(){
		$("#footer").slideToggle();
	});
<?php endif; ?>
<?php if(simpax_hide_cmts()) : ?>
	$(".commentlist").hide();
	$("h3.title-comment").click(function(){
		$(".commentlist").slideToggle();
	});
<?php endif; ?>
<?php endif; ?>
<?php if(simpax_editable()) : ?>
	$(".post-title").editable("<?php bloginfo('stylesheet_directory'); ?>/js/eip_backend.php", { 
        indicator  : "<img src='<?php bloginfo('stylesheet_directory'); ?>/img/loading.gif'><br />Saving...",
        type  : 'text',
        event : 'dblclick',
		cancel : '<?php _e('Abbrechen','simpax');?>',
    });
	$(".post").editable("<?php bloginfo('stylesheet_directory'); ?>/js/eip_backend.php", { 
        indicator  : "<img src='<?php bloginfo('stylesheet_directory'); ?>/img/loading.gif'><br />Saving...",
        type   : 'textarea',
        event  : 'dblclick',
        submit : 'OK',
		cancel : '<?php _e('Abbrechen','simpax');?>',
    });
	$(".list-cats").editable("<?php bloginfo('stylesheet_directory'); ?>/js/eip_backend.php", { 
        indicator  : "<img src='<?php bloginfo('stylesheet_directory'); ?>/img/loading.gif'><br />Saving...",
        type  : 'text',
        event : 'dblclick',
		cancel : '<?php _e('Abbrechen','simpax');?>',
    });
<?php endif; ?>
<?php if(simpax_styles_showcase()) : ?>
	$(".cax_ul_radio").hide();
	$(".container h3").click(function(){
		$(".cax_ul_radio").slideToggle();
	});
<?php endif; ?>
});
</script>

<?php if( (is_single() or is_page()) and simpax_ajaxcmt() ) : ?>
<!-- AJAX-Comments -->
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery-comments.js"></script>
<?php endif; ?>
<?php if(simpax_styles_showcase()) : ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/styleswitch.js"></script>
<?php endif; ?>
<?php if(simpax_editable()) : ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jeditable.js"></script>
<?php endif; ?>
<?php if(simpax_is_livesearch() and !(is_page() or is_single())) : ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/livesearch.js"></script>
<?php endif; ?>


<?php if( simpax_lightbox() == "slim" ) : ?>
<!-- Slimbox -->
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/mootools.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/slimbox.js"></script>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/slim/slimbox.css" />

<?php elseif( simpax_lightbox() == "one" ) : ?>

<!-- lightbox -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/one/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/lightbox.js"></script>
<script type="text/javascript">
	var loadingImage = "<?php bloginfo('stylesheet_directory'); ?>/js/one/images/loading.gif";
	var closeButton = "<?php bloginfo('stylesheet_directory'); ?>/js/one/images/close.gif";
</script>	

<?php elseif ( simpax_lightbox() == "thick" ) : ?>

<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/thick/thickbox.js"></script>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/thick/thickbox.css" />
<?php endif; ?>

<?php if( simpax_nicetitle() ) { ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/nicetitle.js"></script>
<?php } ?>

<?php if(simpax_is_archive() and simpax_archive_timeline()) : ?>
<script src="http://simile.mit.edu/timeline/api/timeline-api.js" type="text/javascript"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/plugins/timeline.js.php" type="text/javascript"></script>
<?php endif; ?>

<?php if(simpax_accordion()) : ?>
<script type="text/javascript">
window.onload = function() {
	new Accordion($$('title-post'), $$('accordion'));
}
</script>
<?php endif; ?>

<!--[if lt IE 7.]>
<![endif]-->

<!-- header etc. -->
<?php wp_head(); ?>

</head>
<body>

<!-- begin page -->
<div id="top">

<?php if( simpax_header_img() ) : ?>


<h1>
<a href="<?php bloginfo('url'); ?>" class="top_link">

<?php if( simpax_is_title_img() ): ?>

<span><?php bloginfo('name'); ?></span>
<img src="<?php simpax_title_img(); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>" id="title_img" <?php if( simpax_title_img_center() ) { ?>class="centered"<?php } ?> />

<?php else : ?>

<?php bloginfo('name'); ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/trans.gif" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>" class="top_img" />

<?php endif; ?>

</a>
</h1>

<?php else : ?>

<h1>
	<a href="<?php bloginfo('url'); ?>" class="top_link"><?php bloginfo('name'); ?></a>
</h1>

<?php endif; ?>

<?php if( simpax_feedicon() ) { ?>
<a href="<?php bloginfo('rss2_url'); ?>">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/trans.gif" class="feedicon" alt="RSS" style="width:32px; height:32px;" />
</a>
<?php } ?>

</div>

<?php if( simpax_pagelist() ) : ?>
<div id="pagelist">
<ul>
	<li><a href="<?php bloginfo('url'); ?>"><?php _e('Startseite','simpax');?></a></li>
    <?php wp_list_pages('title_li='); ?>
</ul>
</div>

<?php endif; ?>

<?php if( simpax_sidebar() and (is_single() or is_page()) ) : ?>
<div class="oneclumn">
<?php endif; ?>

<?php if(simpax_is_cax_spam()) : ?>
<div id="cax_sp4m">
<a href="http://cax-theme.info" target="_blank">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/trans.gif" style="height: 120px !important; width: 120px !important;" alt="CAX - the customizable Wordpres theme!" />
</a>
<a class="sp4m1" href="http://killercup.de/" target="_blank">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/16killercup.png" alt="kc" />
</a>
<a class="sp4m2" href="http://bertoniloose.de.vu/" target="_blank">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/16bertoni.png" alt="ber" />
</a>
</div>
<?php endif; ?>